package bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author： pang-yun
 * @date： 2021-11-30 10:49
 * 功能目的 ：用于
 */

@Data

public class Dog implements Animals{
    public String name;
    @Override
    public void printName() {
        System.out.println(name);
    }


    public Dog() {
        System.out.println("1.无参构造");
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        System.out.println("2.set注入属性");
        this.name = name;
    }

    public void init(){
        System.out.println("3.创建");
    }

    public void destroy(){
        System.out.println("5.销毁");
    }

}
